import { useAxios } from '@/hooks/web/useAxios'
const request = useAxios()
import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()

// 盘点列表
export const zcInventoryListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcInventoryList',
      data: data
    }
  })
}

// 新增
export const zcInventoryAddAdminApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcInventoryAddAdmin',
      data: data
    }
  })
}

// 查看
export const zcInventorySeeApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcInventorySee',
      data: data
    }
  })
}

// 修改
export const zcInventoryEditApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcInventoryEdit',
      data: data
    }
  })
}
// 资产列表
export const zcInventoryDetailedListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcInventoryDetailedList',
      data: data
    }
  })
}

// 删除
export const zcInventoryDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcInventoryDel',
      data: data
    }
  })
}

// 归档
export const zcInventoryEndApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcInventoryEnd',
      data: data
    }
  })
}
